import 'package:flutter/material.dart';
import 'package:bottomappbar_app/MyBottomNavigationBar.dart';
import 'package:bottomappbar_app/MyAppBar.dart';
import 'package:bottomappbar_app/MyBottomAppBar.dart';
import 'package:bottomappbar_app/MyTabView.dart';
import 'MyStackLayout.dart';
import 'MyPageView.dart';
import 'MyGridView.dart';
import 'MySliderView.dart';
import 'MyFormView.dart';
import 'MyCheckBox.dart';
import 'MyPlugins.dart';
import 'MyDialog.dart';
import 'MyChip.dart';
import 'MyTable.dart';
import 'MyCard.dart';
import 'MyStepper.dart';
void main(){
  runApp(MyApp());

}
class MyApp extends StatelessWidget{
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return MaterialApp(
        title:'导航演示1',
        home:myHome()
    );
  }
}
class myHome extends StatelessWidget{

  @override
  Widget build(BuildContext context) {
    List<Widget> list=[
      ListTile(
        title: Text("底部导航栏BottomNavigationBar"),
        onTap: (){
          Navigator.push(context, MaterialPageRoute(builder: (context){return MyBottomNavigationBar();}));
        },
      ),
      ListTile(
        title: Text("自定义AppBar"),
        onTap: (){
          Navigator.push(context, MaterialPageRoute(builder: (context){return MyAppBar();}));
        },
      ),
      ListTile(
        title: Text("自定义BottomAppBar"),
        onTap: (){
          Navigator.push(context, MaterialPageRoute(builder: (context){return MyBottomAppBar();}));
        },
      ),
      ListTile(
        title: Text("Tab滑动标签"),
        onTap: (){
          Navigator.push(context, MaterialPageRoute(builder: (context){return MyTabView();}));
        },
      ),
      ListTile(
        title: Text("Stack重叠控件"),
        onTap: (){
          Navigator.push(context, MaterialPageRoute(builder: (context){return MyStackLayout();}));
        },
      ),
      ListTile(
        title: Text("滑动视图PageView"),
        onTap: (){
          Navigator.push(context, MaterialPageRoute(builder: (context){return MyPageView();}));
        },
      ),
      ListTile(
        title: Text("网格视图GridView"),
        onTap: (){
          Navigator.push(context, MaterialPageRoute(builder: (context){return MyGridView();}));
        },
      ),
      ListTile(
        title: Text("混合视图SliderView"),
        onTap: (){
          Navigator.push(context, MaterialPageRoute(builder: (context){return MySliderView();}));
        },
      ),
      ListTile(
        title: Text("表单"),
        onTap: (){
          Navigator.push(context, MaterialPageRoute(builder: (context){return MyFormView();}));
        },
      ),
      ListTile(
        title: Text("复选框&单选框&开关&滑块"),
        onTap: (){
          Navigator.push(context, MaterialPageRoute(builder: (context){return MyCheckBox();}));
        },
      ),
      ListTile(
        title: Text("第三方插件"),
        onTap: (){
          Navigator.push(context, MaterialPageRoute(builder: (context){return MyPlugins();}));
        },
      ),
      ListTile(
        title: Text("对话框"),
        onTap: (){
          Navigator.push(context, MaterialPageRoute(builder: (context){return MyDialog();}));
        },
      ),
      ListTile(
        title: Text("Chip"),
        onTap: (){
          Navigator.push(context, MaterialPageRoute(builder: (context){return MyChip();}));
        },
      ),
      ListTile(
        title: Text("table数据表格"),
        onTap: (){
          Navigator.push(context, MaterialPageRoute(builder: (context){return MyTable();}));
        },
      ),
      ListTile(
        title: Text("Card卡片"),
        onTap: (){
          Navigator.push(context, MaterialPageRoute(builder: (context){return MyCard();}));
        },
      ),
      ListTile(
        title: Text("Stepper步骤视图"),
        onTap: (){
          Navigator.push(context, MaterialPageRoute(builder: (context){return MyStepper();}));
        },
      )
    ];
    return Scaffold(
      appBar: AppBar(
        title: Text("Flutter组件演示demo"),
        centerTitle: true,
      ),
      body: ListView.builder(
          itemCount: list.length,
          itemBuilder: (BuildContext context,int index){
            return Column(children: <Widget>[list[index],Divider(height: 2.0,)],);
          },
          ),
    );
  }
}

